From 089903105f4f01135008b8a22557ae998b9303e9 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 30 Apr 2025 22:21:01 +0200 Subject: [PATCH] Revert "luci-base: override the load() function to return boolean for FlagValue" This reverts commit 1355a6fa253d765140f5571354939d2e93e6d967. Signed-off-by: Paul Donald --- .../luci-base/htdocs/luci-static/resources/form.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index cccfcdda92..c9af17f1b3 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -4199,19 +4199,6 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ * @default 'ℹ️'; */ - /** - * Coerce the various forms of a 'boolean' string into a true/false value. - * - * @override - */ - load() { - // - let load = this.super('load', arguments); - if (typeof(load) == 'string') - load = ['1', 'on', 'true', 'yes', 'enabled'].includes(load.toLowerCase()); - return load; - }, - /** @private */ renderWidget(section_id, option_index, cfgvalue) { let tooltip = null; -- 2.30.2